# Maintainer: Jordan Christiansen <xordspar0@gmail.com>
pkgname=chocolate-doom
pkgver=3.1.0
pkgrel=0
pkgdesc="Portable release of Doom, Heretic, Hexen, and Strife"
url="https://www.chocolate-doom.org"
arch="all"
license="GPL-2.0-or-later"
makedepends="autoconf automake sdl2-dev sdl2_net-dev sdl2_mixer-dev libpng-dev
	libsamplerate-dev mesa-dev fluidsynth-dev"
subpackages="$pkgname-doc"
options="!check" # no test suite
source="https://github.com/chocolate-doom/chocolate-doom/archive/refs/tags/chocolate-doom-$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgname-$pkgver/"

prepare() {
	default_prepare
	./autogen.sh
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

package() {
	make appdatadir=/usr/share/metainfo DESTDIR="$pkgdir" install
}

sha512sums="
17f65c6f4a48dd1b0aa71bdf495d1036602739f1955d64f7de46157fce912ab4e4344a0f7ad073980f50d67e34f9f5e84402e7f2142cd6364453b71c8d5c2592  chocolate-doom-3.1.0.tar.gz
"
